<?php
/*** Theme setup ***/
add_theme_support( 'post-thumbnails' );
add_theme_support( 'automatic-feed-links' );

add_image_size( 'search-listing', 200, 120, true);

global $blog_id;
if($blog_id){ $thumb_url = "&amp;bid=$blog_id";}

define('TT_ADMIN_FOLDER_NAME','admin');

define('TT_ADMIN_FOLDER_URL',get_bloginfo( 'template_directory', 'display' ).'/'.TT_ADMIN_FOLDER_NAME.'/'); //css folder path
define('TT_THEME_OPTIONS_FOLDER_URL',get_bloginfo( 'template_directory', 'display' ).'/'.TT_ADMIN_FOLDER_NAME.'/theme_options/'); //css folder path
define('TT_WIDGETS_FOLDER_URL',get_bloginfo( 'template_directory', 'display' ).'/'.TT_ADMIN_FOLDER_NAME.'/widgets/'); //WIDGET folder path
define('TT_WIDGET_JS_FOLDER_URL',TT_WIDGETS_FOLDER_URL.'widget_js/'); //css folder path

define('TT_ADMIN_FOLDER_PATH',TEMPLATEPATH.'/'.TT_ADMIN_FOLDER_NAME.'/'); //admin folder path
define('TT_MODULES_FOLDER_PATH',TEMPLATEPATH.'/modules/'); //addons folder path
define('TT_WIDGET_FOLDER_PATH',TT_ADMIN_FOLDER_PATH.'widgets/'); //widget folder path
define('TT_LIBRARY_FOLDER_PATH',TEMPLATEPATH.'/library/'); //library folder path
define('TT_FUNCTIONS_FOLDER_PATH',TT_LIBRARY_FOLDER_PATH . 'functions/'); //functions folder path
define('TT_JSCRIPT_FOLDER_PATH',TT_LIBRARY_FOLDER_PATH . 'js/'); //javascript folder path
define('TT_CSS_FOLDER_PATH',TT_LIBRARY_FOLDER_PATH . 'css/'); //css folder path
define('TT_INCLUDES_FOLDER_PATH',TT_LIBRARY_FOLDER_PATH . 'includes/'); //includes folder path

if(file_exists(TT_FUNCTIONS_FOLDER_PATH . 'custom_filters.php')){
include_once (TT_FUNCTIONS_FOLDER_PATH . 'custom_filters.php'); // custom Filter
}

// Theme admin functions
include_once (TT_FUNCTIONS_FOLDER_PATH . 'custom_functions.php');

include_once(TT_ADMIN_FOLDER_PATH.'admin_main.php');  //ALL ADMIN FILE INTEGRATOR
if(file_exists(TT_WIDGET_FOLDER_PATH . 'widgets_main.php')){
include_once (TT_WIDGET_FOLDER_PATH . 'widgets_main.php'); // Theme admin WIDGET functions
}
if(file_exists(TT_MODULES_FOLDER_PATH . 'modules_main.php')){
include_once (TT_MODULES_FOLDER_PATH . 'modules_main.php'); // Theme moduels include file
}
include_once(TT_ADMIN_FOLDER_PATH.'auto_update_framework.php');  //FRAMEWORK AUTO UPDATE LINK
if(file_exists(TT_INCLUDES_FOLDER_PATH . 'auto_install/auto_install.php')){
include_once (TT_INCLUDES_FOLDER_PATH . 'auto_install/auto_install.php'); // sample data insert file
}
require_once (TT_FUNCTIONS_FOLDER_PATH . 'custom_field.php'); // Custom Field
?>